﻿//日历按钮
function CalendarBtn_onclick(strtb) {
    var retval = "";

    draftdate1 = document.getElementById(strtb).value;
    retval = window.showModalDialog('OA_ShowCalendarDialog.aspx?Date=' + draftdate1, window, "dialogHeight:300px;dialogWidth:300px;edge:sunken;status:no;scroll:no ");

    if (retval != "" && retval != null) {
        document.getElementById(strtb).value = retval;
    }
}

//弹出模态窗口
function OpenModellessDialog(url, height, width) {
    window.showModelessDialog(url + "&rdm=" + Math.random(), document, "dialogHeight: " + height + "px; dialogWidth: " + width + "px;edge: Raised; center: Yes; help: No; resizable: Yes; status: Yes;scroll:Yes");
}

//关闭窗口
function SubmitClose() {

    var e = (window.parent.opener == undefined) ? dialogArguments : window.opener.parent.document;
    alert('已提交完毕！');
    e.forms[0].submit();
    if (window.parent != null) {
        window.parent.close();
    }
    else {
        window.close();
    }
}